home *** CD-ROM | disk | FTP | other *** search
/ Top 200 Programs / Top 200 Programs.iso / Bob8 / THOMPSON / LIBERTY / PRODUCT / LB14W.EXE / CHECKBOX.BAS < prev    next >
BASIC Source File  |  1995-06-14  |  788b  |  46 lines

  1.  
  2.  
  3.     ' This code demonstrates how to use checkboxes in your
  4.     ' Liberty BASIC programs
  5.  
  6.     nomainwin
  7.  
  8.     button #1, "&Ok", [quit], UL, 120, 90, 40, 25
  9.     checkbox #1.cb, "I am a checkbox", [set], [reset], 10, 10, 130, 20
  10.     button #1, "Set", [set], UL, 10, 50
  11.     button #1, "Reset", [reset], UL, 50, 50
  12.     textbox #1.text, 10, 90, 100, 24
  13.  
  14.     WindowWidth = 180
  15.     WindowHeight = 160
  16.     open "Checkbox test" for dialog as #1
  17.     print #1, "trapclose [quit]"
  18.  
  19. [inputLoop]
  20.     input r$ 
  21.  
  22. [set]
  23.  
  24.     print #1.cb, "set"
  25.     goto [readCb]
  26.  
  27.  
  28. [reset]
  29.  
  30.   print #1.cb, "reset"
  31.     goto [readCb]
  32.  
  33.   end
  34.  
  35. [readCb]
  36.  
  37.     print #1.cb, "value?"
  38.     input #1.cb, t$
  39.     print #1.text, "I am "; t$
  40.     goto [inputLoop]
  41.  
  42. [quit]
  43.  
  44.     close #1
  45.     end
  46.